O = 3

CROSS_COMPILE = riscv64-unknown-elf-
CFLASS = -nostdlib -fno-builtin -march=rv32ima -mabi=ilp32 -g -Wall -T os.ld


CFLASS += -O$(O)

CC = $(CROSS_COMPILE)gcc
DUMP = $(CROSS_COMPILE)objdump

SRCS = test_va.c test_vv.c test_a.c test_v.c test_va_v.c test_va_vv.c

ELFS = $(SRCS:.c=.elf)
ASMS = $(SRCS:.c=.s)

all: $(ASMS)

%.s : %.elf
	${DUMP} -S -d $< > $@

%.elf : %.c
	${CC} ${CFLASS} -o $@ $<

.PHONY: clean
clean:
	rm -r *.s
